package com.vanke.agent.common;

import javax.jms.ObjectMessage;
import javax.jms.QueueSender;
import javax.jms.QueueSession;

/**
 * 对象消息发送
 * @author v-nish03
 *
 */
public class QueueMessage extends QueueMsgTemplate {
	
	public final static String messageType = "messageType";
	public final static String messageContent = "messageContent";
	
	@Override
	public void sendMessage(QueueSession session, QueueSender sender)
			throws Exception {
		
        ObjectMessage map = session.createObjectMessage();
        map.setStringProperty(QueueMessage.messageType, "Queue");
        map.setObject(this.getMessage());
        sender.send(map);
	}

}
